<!doctype html>
<html>

<head>
  <meta charset="UTF-8">
  <title>礼品换积分</title>
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  <script>
    var width =window.localStorage.getItem('width');
    document.documentElement.style.fontSize =  width ? width/6.4+  'px' :'55px';
  </script>
  <link href="../../css/mui.min.css" rel="stylesheet" />
  <style>
    html {
      font-family: Roboto, Arial, "Noto Sans CJK SC", "Noto Sans CJK TC", "Pingfang SC", "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
      height: 100%;
      background-color: #F4F4F4; !important;

      overflow: auto;
    }

    body {
      overflow-x: hidden;
      height: 100%;
    }
    p{
      margin: 0;
      color:black;
      font-size: 0.24rem;
    }
    .successText{
      width: 100%;
      text-align: center;
      margin: 1rem 0 0.4rem;
      color:#FF7100;
      font-size: 0.28rem;
    }
    .userInfoTitle{
      width: 90%;
      margin: 0 auto;
      background-color: white;
      overflow: hidden;
      padding: 0.2rem 0;
      border-bottom: 1px solid #AAAAAA;
    }
    .userInfoTitle>div{
      float: left;
    }
    .userInfoTitle>div:nth-child(2){
      margin-top: 0.2rem;
    }
    .userImg img{
      width: 1.2rem;
    }
    .userImg{
      width: 1.2rem;
      height: 1.2rem;
      border-radius: 0.6rem;
      overflow: hidden;
      margin: 0 0.2rem  0 0.2rem;
    }
    .integralInfo{
      width: 90%;
      background-color: white;
      text-align: center;
      margin: 0 auto;
      padding: 0.8rem 0;
    }
    .integralInfo p{
      color:#FF7100;
    }
    .integralInfo p:nth-child(2){
      font-size: 0.28rem;
    }
    .sureBtn{
      width: 60%;
      color:white;
      background-color:#FF7100;
      margin: 0.8rem auto 0 ;
      padding: 0.2rem 0;
      text-align: center;
      font-size: 0.28rem;
    }







  </style>
</head>

<body>
<div class="mui-content" id="app">
    <p class="successText">保存成功</p>

    <!--会员信息-->
    <div class="userInfoTitle">
      <div class="userImg">
        <img :src="userInfo.header" alt="">
      </div>
      <div>
        <p>{{userInfo.userName}} </p>
        <p>ID:{{userInfo.userId}}</p>
      </div>
    </div>
    <!--积分信息-->
    <div class="integralInfo">
      <p>当前积分</p>
      <p>{{integral}}</p>
    </div>
    <!--添加btn-->
    <div class="sureBtn" @click="toIndex" >确定</div>






</div>
<script src="../../js/mui.min.js"></script>
<script src="../../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">


  var vm = new Vue({
    el: '#app',
    data: {
      ifShow: true,
      userInfo: '',
      integral: '',
      currentShopObj: '',
    },
    created: function() {
      mui.init()
      mui.plusReady(function() {
        vm.receiveParams()
      })
    },
    mounted: function() {

    },
    methods: {
      receiveParams: function() {
        var self = plus.webview.currentWebview()
        this.currentShopObj = self.currentShopObj;
        this.userInfo = self.userInfo;
        this.integral = self.integral;

        plus.webview.hide('programme');
        plus.webview.hide('chooseProgramme');
        plus.webview.hide('cardSaveIntegral');
        plus.webview.hide('addIntegral');
        plus.webview.hide('handSaveIntegral');
        plus.webview.hide('peopleAddIntegral');
        plus.webview.hide('people');
        plus.webview.hide('search-user');

        plus.webview.close('programme');
        plus.webview.close('chooseProgramme');
        plus.webview.close('cardSaveIntegral');
        plus.webview.close('addIntegral');
        plus.webview.close('handSaveIntegral');
        plus.webview.close('peopleAddIntegral');
        plus.webview.close('people');
        plus.webview.close('search-user');
      },
      toIndex:function(){
        plus.webview.hide('success');
        plus.webview.close('success');
        mui.openWindow({
          url: '../../Recovery.html',
          id: 'Recovery',
          styles: {
            top: 0, //新页面顶部位置
            bottom: 0, //新页面底部位置
            titleNView: {
              titleText: '',
              titleColor: "#FFFFFF",
              titleSize: "17px",
              backgroundColor: "#FF6800",
              autoBackButton: true,
              //                homeButton: true,
              buttons: [{
                float: "right",
                fontSize: "18px",
                fontSrc: "_www/fonts/iconfont.ttf", //wap2app内置字体文件
                text: "\ue602",
                onclick: function() {
                  var allPage = plus.webview.all()
                  var nowPage = plus.webview.getWebviewById('index')
                  for(var i = 0; i < allPage.length; i++) {
                    if(allPage[i].getURL() !== nowPage.getURL()) {
                      plus.webview.close(allPage[i]);
                    }
                  }
                }
              }],
              splitLine: {
                color: "#CCCCCC",
                height: "1px"
              }
            }
          },
          extras: {
            currentShopObj: this.currentShopObj,
          }
        })

      }



    }
  })

</script>
</body>

</html>